```
import requests
import lxml
from bs4 import BeautifulSoup
import html2text

def main():
    try:
        r = requests.get(url)
        r.encoding = r.apparent_encoding
        soup = BeautifulSoup(r.text, 'html.parser')
        # x1 = soup.find_all('section', 'article typo')
        x1 = soup.find_all('div', 'article-entry')
        f = open('outpuut_file.md', 'w')
        for name in x1:
            print(name.get_text(),file = f)
        f.close()
        # print(soup.get_text()[475:1200])

    except:
        print('爬取失败')
if __name__ == "__main__":
    url = "https://mark-thinkpad.github.io/2019/01/20/sp/"
    main()
```